package com.gg.douyin.sdk.bean.result;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

/**
 * @author guiguan
 * @date 2019/12/11 11:23
 */
@Data
public class BaseResult {

    /**
     * 错误码 example: 0
     */
    @JSONField(name = "error_code")
    private Integer errorCode;

    /**
     * 错误码描述
     */
    @JSONField(name = "description")
    private String description;


    public boolean isSuccess() {
        return this.errorCode == 0;
    }

    public boolean isNotSuccess() {
        return this.errorCode != 0;
    }

}
